// vite.config.js
import {
  viteMockServe
} from "file:///D:/DeskTop/vue3-hooks/node_modules/vite-plugin-mock/dist/index.js";
import {
  defineConfig,
  loadEnv
} from "file:///D:/DeskTop/vue3-hooks/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/DeskTop/vue3-hooks/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///D:/DeskTop/vue3-hooks/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///D:/DeskTop/vue3-hooks/node_modules/unplugin-vue-components/dist/vite.mjs";
import Icons from "file:///D:/DeskTop/vue3-hooks/node_modules/unplugin-icons/dist/vite.mjs";
import IconsResolver from "file:///D:/DeskTop/vue3-hooks/node_modules/unplugin-icons/dist/resolver.mjs";
import {
  ElementPlusResolver
} from "file:///D:/DeskTop/vue3-hooks/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import {
  resolve
} from "path";
var __vite_injected_original_dirname = "D:\\DeskTop\\vue3-hooks";
var vite_config_default = defineConfig(({
  command,
  mode
}) => {
  const env = loadEnv(mode, process.cwd());
  console.log("env", env, mode, command);
  console.log("\u{1F680} ~ file: vite.config.js:28 ~ command:", env.VITE_USE_MOCK);
  return {
    server: {
      public: "www.mugechenxing.com",
      host: "0.0.0.0",
      port: "3000",
      open: false,
      //自动打开 
      base: "./ ",
      //生产环境路径
      proxy: {
        // 本地开发环境通过代理实现跨域，生产环境使用 nginx 转发
        // 正则表达式写法
        "^/api": {
          target: env.VITE_APP_BASE_URL,
          // 后端服务实际地址
          changeOrigin: true,
          //开启代理
          rewrite: (path) => path.replace(/^\/api/, "")
        }
      }
    },
    resolve: {
      alias: {
        "@": resolve(__vite_injected_original_dirname, "./src")
      }
    },
    plugins: [
      vue(),
      viteMockServe({
        // default
        supportTs: false,
        logger: true,
        mockPath: "./mock/",
        localEnabled: env.VITE_USE_MOCK,
        prodEnabled: false
      }),
      AutoImport({
        resolvers: [
          ElementPlusResolver(),
          IconsResolver({
            prefix: "Icon"
          })
        ]
      }),
      Components({
        resolvers: [
          ElementPlusResolver(),
          // Auto register icon components
          // 自动注册图标组件
          IconsResolver({
            enabledCollections: ["ep"]
          })
        ]
      }),
      Icons({
        autoInstall: true
      })
    ]
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxEZXNrVG9wXFxcXHZ1ZTMtaG9va3NcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkQ6XFxcXERlc2tUb3BcXFxcdnVlMy1ob29rc1xcXFx2aXRlLmNvbmZpZy5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRDovRGVza1RvcC92dWUzLWhvb2tzL3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHtcclxuXHR2aXRlTW9ja1NlcnZlXHJcbn0gZnJvbSAndml0ZS1wbHVnaW4tbW9jaydcclxuaW1wb3J0IHtcclxuXHRkZWZpbmVDb25maWcsXHJcblx0bG9hZEVudlxyXG59IGZyb20gJ3ZpdGUnXHJcbmltcG9ydCB2dWUgZnJvbSAnQHZpdGVqcy9wbHVnaW4tdnVlJ1xyXG5pbXBvcnQgQXV0b0ltcG9ydCBmcm9tICd1bnBsdWdpbi1hdXRvLWltcG9ydC92aXRlJ1xyXG5pbXBvcnQgQ29tcG9uZW50cyBmcm9tICd1bnBsdWdpbi12dWUtY29tcG9uZW50cy92aXRlJ1xyXG5pbXBvcnQgSWNvbnMgZnJvbSAndW5wbHVnaW4taWNvbnMvdml0ZSdcclxuaW1wb3J0IEljb25zUmVzb2x2ZXIgZnJvbSAndW5wbHVnaW4taWNv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